package com.ruoyi.supermarket.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 进货管理对象 purchase
 * 
 * @author wzy
 * @date 2024-07-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Purchase extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 进货id */
    @Excel(name = "进货id")
    private Long pid;

    /** 货物外键id */
    @Excel(name = "货物外键id")
    private Long gid;

    /** 进货数量 */
    @Excel(name = "进货数量")
    private Long pcount;

    /** 进货价格 */
    @Excel(name = "进货价格")
    private Long pprice;

    /** 进货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "进货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date ptime;

    /** 删除标记 */
    private Long deleted;

    public void setPid(Long pid) 
    {
        this.pid = pid;
    }

    public Long getPid() 
    {
        return pid;
    }
    public void setGid(Long gid) 
    {
        this.gid = gid;
    }

    public Long getGid() 
    {
        return gid;
    }
    public void setPcount(Long pcount) 
    {
        this.pcount = pcount;
    }

    public Long getPcount() 
    {
        return pcount;
    }
    public void setPprice(Long pprice) 
    {
        this.pprice = pprice;
    }

    public Long getPprice() 
    {
        return pprice;
    }
    public void setPtime(Date ptime) 
    {
        this.ptime = ptime;
    }

    public Date getPtime() 
    {
        return ptime;
    }
    public void setDeleted(Long deleted) 
    {
        this.deleted = deleted;
    }

    public Long getDeleted() 
    {
        return deleted;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("pid", getPid())
            .append("gid", getGid())
            .append("pcount", getPcount())
            .append("pprice", getPprice())
            .append("ptime", getPtime())
            .append("deleted", getDeleted())
            .toString();
    }
}
